﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace klassen_car
{
    class Car
    {
        public string Brand { get; set; }
        public int Year { get; set; }
        public int Price { get; set; }

        public Car(string Brand, int Year, int Price)
        {
            this.Brand = Brand;
            this.Year = Year;
            this.Price = Price;
        }

        public Car()
        {
            Brand = "";
            Year = -1;
            Price = -1;
        }

        public void ReadFromConsole()
        {
            Console.Write("Ange märke: ");
            Brand = Console.ReadLine();
            Console.Write("Ange årtal: ");
            Year = System.Convert.ToInt32(Console.ReadLine());
            Console.Write("Ange pris: ");
            Price = System.Convert.ToInt32(Console.ReadLine());
        }

        public void WriteToConsole()
        {
            Console.WriteLine("Märke: " + Brand + ", årtal: " + Year + ", pris: " + Price + ".");
        }

        
    }
}
